package meng.study.fastdfs.client;

import java.io.File;

import org.junit.Test;

public class FastDFSClientTest {

	@Test
	public void testUpload() {
		File file = new File("E://fastdfs//111.mp4");
		String s = FastDFSClient.uploadFile(file);
		System.out.println("http://192.168.100.35:8888/" + s);
	}

	@Test
	public void testDownload() {
		File file = new File("E://fastdfs//copy.txt");
		String fileId = "group1/M00/00/00/wKhkI1qPeXSAUEqGAAAAv0nz9Ro005.txt";
		int count = FastDFSClient.downloadFile(fileId, file);
		System.out.println(count);
	}

	@Test
	public void testDelete() {
		String fileId = "group1/M00/00/00/wKhkI1qOfLiAEyvbAAedTUYuNF0226.png";
		int count = FastDFSClient.deleteFile(fileId);
		System.out.println(count);
	}

}
